package com.mall.users.service;

import com.mall.users.mapper.UmsRoleResourceRelationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class UmsRoleResourceRelationService {

    @Autowired
    private UmsRoleResourceRelationMapper umsRoleResourceRelationMapper;

    public List<Long> findByRoleIds(List<Long> roleIds) {
        return umsRoleResourceRelationMapper.findByRoleIds(roleIds);
    }

    public void save(Long roleId, List<Long> resourceIds) {
        umsRoleResourceRelationMapper.save(roleId, resourceIds);
    }
}
